public class Main {
    public static void main(String[] args) {
        short s = 1234;
        int i = 123456;

        int x = s + i; // short s自动转型为int
        short y = s + i; // 编译错误! 高位放不回去低位


       	// 强制转换类型
        int i = 12345;
        short s = (short) i; // 12345

        int i1 = 1234567;
        short s1 = (short) i1; // -10617
        System.out.println(s1);
        
        int i2 = 12345678;
        short s2 = (short) i2; // 24910
        System.out.println(s2);
    }
}